package com.ghpt.controller;


import com.ghpt.pojo.Pland;
import com.ghpt.pojo.Result;
import com.ghpt.service.PlandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/pland")
public class PlandController {
    @Autowired
    private PlandService plandService;

    @PutMapping("/insert/{value}")
    public Result insert(@PathVariable int value){
        Pland pland = new Pland(null, value);
        return plandService.insert(pland) > 0 ? Result.success() : Result.error("插入失败");
    }
}
